<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript" src="<%=path%>/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
	
	$(function(){
		var num =8372.2+628.20;
		
		
		var nums=addNum(num,0.0);
		alert(nums);
	});
	
	function addNum(num1,num2){
		var sq1,sq2,m;
		try{sq1=num1.toString().split(".")[1].length;} catch(e){sq1=0;}
		try{sq2=num2.toString().split(".")[1].length;} catch(e){sq2=0;}

		m=Math.pow(10,Math.max(sq1,sq2));
		return ( num1 * m + num2 * m ) / m;
		}
</script>

</head>
<body>

</body>
</html>